<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Wait for Z39.50 requests to complete</title>
 </head>
 <body class="docs"><div id="layout">
  <div id="layout-content"><div id="function.yaz-wait" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">yaz_wait</h1>
  <p class="verinfo">(PHP 4 &gt;= 4.0.1, PECL yaz &gt;= 0.9.0)</p><p class="refpurpose"><span class="refname">yaz_wait</span> &mdash; <span class="dc-title">Wait for Z39.50 requests to complete</span></p>

 </div>
 <div class="refsect1 description" id="refsect1-function.yaz-wait-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>yaz_wait</strong></span>
    ([ <span class="methodparam"><span class="type">array</span> <code class="parameter reference">&$options</code></span>
  ] ) : <span class="type"><a href="language.pseudo-types.html#language.types.mixed" class="type mixed">mixed</a></span></div>

  <p class="para rdfs-comment">
   This function carries out networked (blocked) activity for outstanding
   requests which have been prepared by the functions 
   <span class="function"><a href="yaz_connect.html" class="function">yaz_connect()</a></span>, <span class="function"><a href="yaz_search.html" class="function">yaz_search()</a></span>, 
   <span class="function"><a href="yaz_present.html" class="function">yaz_present()</a></span>, <span class="function"><a href="yaz_scan.html" class="function">yaz_scan()</a></span> and 
   <span class="function"><a href="yaz_itemorder.html" class="function">yaz_itemorder()</a></span>.
  </p>
  <p class="para">
   <span class="function"><strong>yaz_wait()</strong></span> returns when all servers have either
   completed all requests or aborted (in case of errors).
  </p>
 </div>

 <div class="refsect1 parameters" id="refsect1-function.yaz-wait-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>

    
     <dt>
<code class="parameter">options</code></dt>

     <dd>

      <p class="para">
       An associative array of options:
       <dl>

        
         <dt>
<em>timeout</em></dt>

         <dd>

          <p class="para">
           Sets timeout in seconds. If a server has not responded within the
           timeout it is considered dead and <span class="function"><strong>yaz_wait()</strong></span>
           returns. The default value for timeout is 15 seconds.
          </p>
         </dd>

        
        
         <dt>
<em>event</em></dt>

         <dd>

          <p class="para">
           A boolean.
          </p>
         </dd>

        
       </dl>

      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 <div class="refsect1 returnvalues" id="refsect1-function.yaz-wait-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>TRUE</code></strong>， 或者在失败时返回 <strong><code>FALSE</code></strong>。
   In event mode, returns resource  或者在失败时返回 <strong><code>FALSE</code></strong>.
  </p>
 </div>

</div></div></div></body></html>